<!DOCTYPE html>
<html lang="zh">
    <head>
        <title>分单规则 | OMS</title>
        <meta charset="utf-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <meta http-equiv="cache-control" content="no-cache" />
        <meta http-equiv="expires" content="Thu, 19 Nov 1900 08:52:00 GMT" />
        
        <!-- 加载 bootstrap 样式-->
        <link type="text/css" rel="stylesheet" href="/Apollo/madmin/vendors/jquery-ui-1.10.4.custom/css/ui-lightness/jquery-ui-1.10.4.custom.min.css" />
        <link type="text/css" rel="stylesheet" href="/Apollo/madmin/vendors/font-awesome/css/font-awesome.min.css" />
        <link type="text/css" rel="stylesheet" href="/Apollo/madmin/vendors/bootstrap/css/bootstrap.min.css" />
        
        <!-- 加载本页需要的三方插件样式 -->
	    <link type="text/css" rel="stylesheet" href="/Apollo/madmin/vendors/DataTables/media/css/jquery.dataTables.css">
	    <link type="text/css" rel="stylesheet" href="/Apollo/madmin/vendors/DataTables/extensions/TableTools/css/dataTables.tableTools.min.css">
	    <link type="text/css" rel="stylesheet" href="/Apollo/madmin/vendors/DataTables/media/css/dataTables.bootstrap.css">
	    <link type="text/css" rel="stylesheet" href="/Apollo/madmin/vendors/jquery-tablesorter/themes/blue/style-custom.css">
	    <link type="text/css" rel="stylesheet" href="/Apollo/madmin/vendors/jquery-bootstrap-wizard/custom.css">
	    <link type="text/css" rel="stylesheet" href="/Apollo/madmin/vendors/jquery-steps/css/jquery.steps.css">
        <link type="text/css" rel="stylesheet" href="/Apollo/madmin/vendors/animate.css/animate.css" />
        <link type="text/css" rel="stylesheet" href="/Apollo/madmin/vendors/iCheck/skins/all.css" />
        
        <!-- 加载主题风格样式 -->
        <link type="text/css" rel="stylesheet" href="/Apollo/madmin/css/themes/style1/orange-blue.css" class="default-style" />
        <link type="text/css" rel="stylesheet" href="/Apollo/madmin/css/themes/style1/orange-blue.css" id="theme-change" class="style-change color-change" />
        <link type="text/css" rel="stylesheet" href="/Apollo/madmin/css/style-responsive.css" />
    </head>
    <body class="">
	    <!--BEGIN CONTENT-->
	    <div class="page-content">
	        <div class="container-fluid">
				<div class="row">
					<div class="col-lg-8 col-xs-8 col-sm-8 col-md-8" style="line-height:36px;">
                        <div class="actions">
                            <!-- <a href="#" class="btn btn-xs btn-info" data-toggle="modal" data-target="" onclick="newSplitRule()">
                                <i class="fa"></i>&nbsp;创建规则
                            </a> -->
                        </div>
                    </div>
					<div class="col-lg-4 col-xs-4 col-sm-4 col-md-4" style="margin-bottom: 10px;">
	                    <div class="input-group">
	                        <input id="quickSearch" type="text" placeholder="项目、店铺名称" class="form-control" />
	                        <span class="input-group-btn">
		                        <button id="btnQuickSearch" type="button" class="btn btn-primary">
		                        	<i class="fa fa-search"></i>
		                        </button>
	                        </span>
	                    </div>
                    </div>
				</div>
				<div class="row">
                    <div class="col-lg-12">
				        <div class="portlet box portlet-blue" style="margin-bottom: 15px;">
				            <div class="portlet-header">
				                <div class="caption">分单规则列表</div>
                                <div class="actions">
                                	<!-- <a href="#" class="btn btn-xs btn-warning" data-toggle="modal" data-target="" onclick="newSplitRule()">
                                		<i class="fa"></i>&nbsp;创建规则
                                	</a>&nbsp; -->
                                	<a href="#" class="btn btn-xs btn-warning" data-toggle="modal" data-target="" onclick="splitRuleTable.draw();">
                                		<i class="fa"></i>&nbsp;刷新
                                	</a>&nbsp;
                                	<!--  
                                	<a href="#" class="btn btn-xs btn-orange" data-toggle="" data-target="" onclick="exportSplitInfo();">
                                		<i class="fa fa-save"></i>&nbsp;导出分单规则
                                	</a>&nbsp;
                                	-->
                                </div>
				            </div>
				            <div class="portlet-body">
                                <table id="splitRuleTable" class="table table-hover table-striped table-bordered table-advanced tb-sticky-header" width="100%">
                                    <thead>
                                        <tr>
                                        	<th width="1%" colValue=""></th>
                                        	<th width="14%" colValue="">项目</th>
                                            <th width="18%" colValue="">店铺</th>
                                            <th width="8%" colValue="">来源平台</th>
                                            <th width="10%" colValue="">分单方式</th>
                                            <th width="6%" colValue="">状态</th>
                                            <th width="14%" colValue="">操作</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                    </tbody>
                                </table>
				            </div>
				        </div>
                    </div>
                </div>
	        </div>
	    </div>
	    
	    <!-- ====================================== 窗口区 ===================================== -->
	    <!-- 创建分单规则 -->
        <div id="modalCreate" tabindex="-1" role="dialog" aria-labelledby="modal-header-primary-label" data-backdrop="static" aria-hidden="true" class="modal fade">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header modal-header-primary">
                        <button type="button" data-dismiss="modal" aria-hidden="true" class="close">&times;</button>
                        <h4 id="modal-header-primary-label" class="modal-title">创建分单规则</h4>
                    </div>
                    <div class="modal-body">
                    	<h3 class="mbxl">选择平台</h3>
						<form id="splitRuleCreateForm" role="form" action="" class="form-horizontal">
							<div class="form-group">
								<label for="prjId" class="col-sm-3 control-label">项目<span class='require'>*</span>
								</label>
								<div class="col-sm-9">
                                     <select id="prjId" name="prjId" class="form-control" required>
                                         <option value="">请选择</option>
                                     </select>
									<i class="alert alert-hide">项目是必选项</i>
								</div>
							</div>
							<div class="form-group">
								<label for="shopId" class="col-sm-3 control-label">店铺 <span class='require'>*</span>
								</label>
								<div class="col-sm-9">
                                     <select id="shopId" name="shopId" class="form-control" required>
                                         <option value="">请选择</option>
                                     </select>
								</div>
							</div>
							<div class="form-group">
								<label for="splitType" class="col-sm-3 control-label">分单方式 <span class='require'>*</span>
								</label>
								<div class="col-sm-9">
                                     <select id="splitType" name="splitType" class="form-control" required>
                                         <option value="">请选择</option>
                                     </select>
								</div>
							</div>
						</form>
					</div>
                    <div class="modal-footer">
                        <button type="button" data-dismiss="modal" class="btn btn-default">取消</button>
                        <button id="btnSplitRuleSave" type="button" class="btn btn-primary">保存</button>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 创建分单规则创建成功提示 -->
        <div id="modalCreateInfo" tabindex="-1" role="dialog" aria-labelledby="modal-header-primary-label" data-backdrop="static" aria-hidden="true" class="modal fade">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header modal-header-primary">
                        <button type="button" data-dismiss="modal" aria-hidden="true" class="close">&times;</button>
                        <h4 id="modal-header-primary-label" class="modal-title">分单规则创建成功</h4>
                    </div>
                    <div class="modal-body">
                    	<div class="mbxl">是否立即设置规则详情？</div>
					</div>
                    <div class="modal-footer">
                        <button type="button" data-dismiss="modal" class="btn btn-default">否</button>
                        <button id="btnSplitRuleItemSet" type="button" class="btn btn-primary">是</button>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 设置规则详情 -->
        <div id="showItemList" tabindex="-1" role="dialog" aria-labelledby="modal-header-primary-label" data-backdrop="static" aria-hidden="true" class="modal fade">
            <div class="modal-dialog modal-wide-width" >
                <div class="modal-content">
                    <div class="modal-header modal-header-primary">
                        <button type="button" data-dismiss="modal" aria-hidden="true" class="close">&times;</button>
                        <h4 id="showItemListTitle" class="modal-title">设置规则详情</h4>
                    </div>
                    <div class="modal-body">
                    	<div class="col-lg-6 col-xs-6 col-sm-6 col-md-6" style="margin-top: 5px;">
                    		<div id="" style='color:red;'>说明：设置分单店铺时，如果平台商品不可选请联系系统管理员。</div>
                    	</div>
                    	<div class="col-lg-2 col-xs-2 col-sm-2 col-md-2" style="margin-bottom: 10px;">
                    		<span class="input-group-btn">
                    			<a id="btnSplitShop" data-toggle="modal" data-target="" class="btn btn-primary">&nbsp;设置分单店铺</a>
			                 </span>
                    	</div>
                    	<div class="col-lg-4 col-xs-4 col-sm-4 col-md-4" style="margin-bottom: 10px;">
		                    <div class="input-group">
		                        <input id="quickItemSearch" type="text" placeholder="商品编码, 商品名称" class="form-control" />
		                        <span class="input-group-btn">
			                        <button id="btnQuickItemSearch" type="button" class="btn btn-primary">
			                        	<i class="fa fa-search"></i>
			                        </button>
		                        </span>
		                    </div>
                    	</div>
                    	
					</div>
					<div class="portlet-body container-fluid">
					<!-- style="table-layout:fixed;"不能删除，否则th和下面的数据对不齐 -->
                         <table id="splitRuleItemTable" style="table-layout:fixed;" class="table table-hover table-striped table-bordered table-advanced tb-sticky-header" >
                             <thead>
                                 <tr>
                                 	<th width="10%" colValue="">
                                    <input id="chkAll" name="chkAll" type="checkbox" colValue="chk" class="checkall"/>
                                    </th>
                                 	<th width="20%" colValue="">平台商品编码</th>
                                     <th width="30%" colValue="">平台商品名称</th>
                                     <th width="20%" colValue="">商家编码</th>
                                     <th width="20%" colValue="">分单店铺</th>
                                 </tr>
                              </thead>
                              <tbody>
                              </tbody>
                         </table>
		            </div>
                </div>
            </div>
        </div>
        
        <div id="modalSplitShop" tabindex="-1" role="dialog" aria-labelledby="modal-header-primary-label" data-backdrop="static" aria-hidden="true" class="modal fade">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header modal-header-primary">
                        <button type="button" data-dismiss="modal" aria-hidden="true" class="close">&times;</button>
                        <h4 id="modal-header-primary-label" class="modal-title">设置分单店铺</h4>
                    </div>
                    <div class="modal-body">
                    	<div class="mbxl">请选择所选平台商品的分单店铺</div>
                    	<form id="splitShopForm" role="form" action="" class="form-horizontal">
							<div class="form-group">
								<label for="splitShopId" class="col-sm-3 control-label">分单店铺<span class='require'>*</span>
								</label>
								<div class="col-sm-9">
                                     <select id="splitShopId" name="splitShopId" class="form-control" required>
                                         <option value="">请选择</option>
                                     </select>
                                     <input type="hidden" id="hidShopId" />
                                     <input type="hidden" id="hidsplitRuleId" />
									<i class="alert alert-hide">分单店铺是必选项</i>
								</div>
							</div>
						</form>
					</div>
                    <div class="modal-footer">
                        <button type="button" data-dismiss="modal" class="btn btn-default">否</button>
                        <button id="btnCompleteInfo" type="button" class="btn btn-primary">是</button>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 创建分单规则创建成功提示 -->
        <div id="modalCompleteInfo" tabindex="-1" role="dialog" aria-labelledby="modal-header-primary-label" data-backdrop="static" aria-hidden="true" class="modal fade">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header modal-header-primary">
                        <button type="button" data-dismiss="modal" aria-hidden="true" class="close">&times;</button>
                        <h4 id="modal-header-primary-label" class="modal-title">修改规则</h4>
                    </div>
                    <div class="modal-body">
                    	<div class="mbxl" id="infoMessage">所选平台商品将被分单至“古今ERP”的“大瑞古今店”，是否确认？</div>
					</div>
                    <div class="modal-footer">
                        <button type="button" data-dismiss="modal" class="btn btn-default">取消</button>
                        <button id="btnconfirmInfo" type="button" class="btn btn-primary">确认</button>
                    </div>
                </div>
            </div>
        </div>
        <!-- 是否启用 -->
        <div id="modalEnable" tabindex="-1" role="dialog" aria-labelledby="modal-header-primary-label" data-backdrop="static" aria-hidden="true" class="modal fade">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header modal-header-primary">
                        <button type="button" data-dismiss="modal" aria-hidden="true" class="close">&times;</button>
                        <h4 id="modal-header-primary-label" class="modal-title">分单规则启用设置</h4>
                    </div>
                    <div class="modal-body">
                    	<div class="mbxl" id="infoMessage">是否立即启用分单规则？</div>
					</div>
                    <div class="modal-footer">
                        <button type="button" data-dismiss="modal" class="btn btn-default">取消</button>
                        <button id="btnEnable" type="button" class="btn btn-primary">确认</button>
                    </div>
                </div>
            </div>
        </div>
		<!-- 导出文件 
		<div id="exportList" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static" class="modal fade" aria-labelledby="modal-header-primary-label">
		</div>
		-->
		<!--END CONTENT -->
	    <!-- 加载 jquery js-->
	    <script src="/Apollo/madmin/js/jquery-1.10.2.min.js"></script>
	    <script src="/Apollo/madmin/js/jquery-migrate-1.2.1.min.js"></script>
	    <script src="/Apollo/madmin/js/jquery-ui.js"></script>
	    
	    <!-- 加载 bootstrap 和三方插件 js -->
	    <script src="/Apollo/madmin/vendors/bootstrap/js/bootstrap.min.js"></script>
	    <script src="/Apollo/madmin/vendors/bootstrap-hover-dropdown/bootstrap-hover-dropdown.js"></script>
	    <script src="/Apollo/madmin/js/html5shiv.js"></script>
	    <script src="/Apollo/madmin/js/respond.min.js"></script>
	    <script src="/Apollo/madmin/vendors/jquery-cookie/jquery.cookie.js"></script>
	    <script src="/Apollo/madmin/vendors/iCheck/icheck.min.js"></script>
	    <script src="/Apollo/madmin/vendors/iCheck/custom.min.js"></script>
	    <script src="/Apollo/madmin/vendors/jquery-notific8/jquery.notific8.min.js"></script>
	    <script src="/Apollo/madmin/vendors/jquery-pace/pace.min.js"></script>
	    <script src="/Apollo/madmin/vendors/holder/holder.js"></script>
	    <script src="/Apollo/madmin/vendors/responsive-tabs/responsive-tabs.js"></script>
	    <script src="/Apollo/madmin/vendors/moment/moment.js"></script>
	    <script src="/Apollo/madmin/vendors/DataTables/media/js/jquery.dataTables.js"></script>
	    <script src="/Apollo/madmin/vendors/DataTables/media/js/dataTables.bootstrap.js"></script>
	    <script src="/Apollo/madmin/vendors/DataTables/extensions/TableTools/js/dataTables.tableTools.min.js"></script>
    	<script src="/Apollo/madmin/vendors/jquery-tablesorter/jquery.tablesorter.js"></script>
    	<script src="/Apollo/madmin/js/table-advanced.js"></script>
	    <script src="/Apollo/madmin/vendors/jquery-validate/jquery.validate.min.js"></script>
	    <script src="/Apollo/madmin/vendors/jquery-validate/message_zh.js"></script>
	    <script src="/Apollo/madmin/vendors/jquery-steps/js/jquery.steps.min.js"></script>
	    <script src="/Apollo/madmin/vendors/jquery-bootstrap-wizard/jquery.bootstrap.wizard.min.js"></script>

	    <!-- 加载本页面对应的js -->
	    <script src="splitRule.js"></script> 
	    <script src="/views/static/js/export.js"></script>
    </body>
</html>